/*
 * @Author: 朱自强
 * @Date: 2023-11-09 11:15:37
 * @LastEditors: 朱自强
 * @LastEditTime: 2023-11-09 14:29:02
 * @FilePath: \vite-project\vite.config.ts
 * @Description:
 *
 * Copyright (c) 2023 by 朱自强, All Rights Reserved.
 */
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    host: "0.0.0.0",
  },
  resolve: {
    alias: {
      "@": resolve(__dirname, "src"),
      "@/components": resolve(__dirname, "src/components"),
      "@/directives": resolve(__dirname, "src/directives"),
      "@/plugins": resolve(__dirname, "src/plugins"),
      "@/views": resolve(__dirname, "src/views"),
      "@/layout": resolve(__dirname, "src/layout"),
      "@/utils": resolve(__dirname, "src/utils"),
      "@/api": resolve(__dirname, "src/api"),
      "@/styles": resolve(__dirname, "src/styles"),
      "@/store": resolve(__dirname, "src/store"),
      "@/storage": resolve(__dirname, "src/storage"),
      "@/settings": resolve(__dirname, "src/settings"),
      "@/router": resolve(__dirname, "src/router"),
      "@/hooks": resolve(__dirname, "src/hooks"),
      "@/enums": resolve(__dirname, "src/enums"),
      "//#//": resolve(__dirname, "types"),
    },
    extensions: [".js", ".ts", ".tsx", ".vue", ".vuex"],
  },
});
